cmake_minimum_required(VERSION 3.14) # for FetchContent
project(web_backend LANGUAGES CXX)

# #------ FetchContent ------
# set(OATPP_SRC ${CMAKE_CURRENT_SOURCE_DIR}/third_party/oatpp)
# include(FetchContent)
# # if(${CMAKE_VERSION} VERSION_LESS 3.14)
# #     include(add_FetchContent_MakeAvailable.cmake)
# # endif()
# FetchContent_Declare(
#     oatpp
#     GIT_REPOSITORY https://github.com/oatpp/oatpp.git
#     GIT_TAG 1.3.0
#     SOURCE_DIR ${OATPP_SRC}
#     )
# FetchContent_MakeAvailable(oatpp)
# #------ End for FetchContent ------

find_package(oatpp REQUIRED)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
file(GLOB SRC_LIST "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")

add_executable(${PROJECT_NAME} ${SRC_LIST})

target_link_libraries(${PROJECT_NAME} oatpp::oatpp)